# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=8

DESCRIPTION="Compiler (C++ emitter) with an editor (IDE) that strives for 100% Qbasic and QuickBasic 4.5 compatibility"
HOMEPAGE="https://qb64phoenix.com/"
SRC_URI="mirror://github/QB64-Phoenix-Edition/QB64pe/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="freedist"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="midi"

DEPEND="media-libs/libsdl[X,joystick,video]
	media-libs/sdl-mixer
	media-libs/sdl-image
	media-libs/sdl-net
	media-libs/sdl-ttf
	x11-libs/libX11
	midi? ( media-sound/timidity++ )"
RDEPEND="${DEPEND}"

S=${WORKDIR}/QB64pe-${PV}

src_prepare() {
	eapply_user
#
#	cp "internal/source/"* "internal/temp" || die 'sources preparation failed'
}

src_compile() {
	emake OS=lnx BUILD_QB64=y
}

src_install() {
	dobin "${PN}"

	doicon "source/${PN}.png"
	domenu "${FILESDIR}/${PN}.desktop"

	doman "${PN}.1"

	xxxxxx

#	doins readme.txt audio.txt
#	doins -r samples
}
